package ynu.lcy.entity;



import lombok.Getter;
import lombok.Setter;

import org.springframework.util.DigestUtils;

import javax.persistence.Column;


@Setter
@Getter
public abstract class User extends LogicEntity {

    protected String userPhone;

    protected String userName;


    protected String password;


    protected String userAvatar;

    /**
     * 创建所有User时，密码经过md5加密
     * @param psd
     */
    public void setPassword(String psd){
        this.password = DigestUtils.md5DigestAsHex(psd.getBytes());
    }


    protected String userRole;

}
